package com.woniu.outlet.dao;

import com.woniu.outlet.po.OrderDetails;
import com.woniu.outlet.po.OrderDetailsExample;
import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RestController;

@Repository
public interface OrderDetailsMapper {
    long countByExample(OrderDetailsExample example);

    int deleteByExample(OrderDetailsExample example);
    int deleteByPrimaryKey(Long id);

    int insert(OrderDetails record);
    int insertSelective(OrderDetails record);

    List<OrderDetails> selectByExample(OrderDetailsExample example);
    OrderDetails selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") OrderDetails record, @Param("example") OrderDetailsExample example);
    int updateByExample(@Param("record") OrderDetails record, @Param("example") OrderDetailsExample example);
    int updateByPrimaryKeySelective(OrderDetails record);
    int updateByPrimaryKey(OrderDetails record);

    //删除订单明细(根据订单编号)
    @Delete("delete from ERP_order_details where order_no = #{orderNo}")
    void deleteByOrderNo(String orderNo);
}